﻿using System.Security.Principal;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SharePoint.UserAccountControl;

namespace SharePoint.UserAccountControl.Tests
{
    [TestClass]
    public class SecurityTest
    {
        [TestMethod]
        public void RemoveDomainFromUserName_should_remove_domain_prefix()
        {
            var userName = "contoso\\administrator";
            var result = Security.RemoveDomainFromUserName(userName);
            Assert.AreEqual("administrator", result);
        }

        [TestMethod]
        public void GetUserInfoTest()
        {
            Security.GetUserInfo("contoso\\hilpalm2");
        }

    }
}
